package com.eolcum.evo.persistence;

//import javax.xml.bind.annotation.XmlElement;

public class Sensor {

	private int id;
	private int roomId;
	private double activeTemp;
	private double activeHumidity;
	private boolean activeOccupied;
	private long lastActiveTimeInMillis;
	
	private boolean hasTemp = false;
	private boolean hasOccup = false;
	private boolean hasHumid = false;
	
	public synchronized boolean isHasTemp() {
		return hasTemp;
	}

	public synchronized void setHasTemp(boolean hasTemp) {
		this.hasTemp = hasTemp;
	}

	public synchronized boolean isHasOccup() {
		return hasOccup;
	}

	public synchronized void setHasOccup(boolean hasOccup) {
		this.hasOccup = hasOccup;
	}

	public synchronized boolean isHasHumid() {
		return hasHumid;
	}

	public synchronized void setHasHumid(boolean hasHumid) {
		this.hasHumid = hasHumid;
	}

	
	
	public synchronized double getActiveHumidity() {
		return activeHumidity;
	}

	public synchronized void setActiveHumidity(double activeHumidity) {
		this.activeHumidity = activeHumidity;
	}

	private String serialNo;

	public Sensor() {
	}

	/**
	 * @return the id
	 */
	public synchronized int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
//	@XmlElement(required = true, name = "SensorId")
	public synchronized void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the roomId
	 */
	public synchronized int getRoomId() {
		return roomId;
	}

	/**
	 * @param roomId
	 *            the roomId to set
	 */
//	@XmlElement(required = true, name = "SensorRoomId")
	public synchronized void setRoomId(int roomId) {
		this.roomId = roomId;
	}

	public synchronized double getActiveTemp() {
		return activeTemp;
	}

//	@XmlElement(required = false, name = "SensorActiveTemp")
	public synchronized void setActiveTemp(double activeTemp) {
		this.activeTemp = activeTemp;
	}

	/**
	 * @return the serialNo
	 */
	public synchronized String getSerialNo() {
		return serialNo;
	}

	/**
	 * @param serialNo
	 *            the serialNo to set
	 */
//	@XmlElement(required = true, name = "SensorSerialNo")
	public synchronized void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}

	public synchronized boolean isActiveOccupied() {
		return activeOccupied;
	}

	public synchronized void setActiveOccupied(boolean activeOccupied) {
		this.activeOccupied = activeOccupied;
	}

	public long getLastActiveTimeInMillis() {
		return lastActiveTimeInMillis;
	}

	public void setLastActiveTimeInMillis(long lastActiveTimeInMillis) {
		this.lastActiveTimeInMillis = lastActiveTimeInMillis;
	}
}
